﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<EnterpriseManagement.Models.TeamMemberModel>>" %>
<%@ Import Namespace="EnterpriseManagement.Models"%>
<%@ Import Namespace="Webdiyer.WebControls.Mvc"%>
<style>
.teammembertd
{
	width:80px;
}

</style>

<div id="teammember"> 
<%TeamMemberModel teamMember=Model.First(); %>
<hr width="90%" />

<table class ="noframe" style ="margin-left:10%">
    <tr>
        <td class="teammembertd"><%:Html.LabelFor(model => teamMember.ProjectName)%></td>  
        <td class="teammembertd"><%:Html.LabelFor (model=>teamMember.EmployeeId) %></td>
        <td class="teammembertd"><%:Html.LabelFor(model => teamMember.EmployeeName)%></td>
        <td class="teammembertd"><%:Html.LabelFor(model => teamMember.Position)%></td>
        <td class="teammembertd"><%:Html.LabelFor(model => teamMember.Director)%></td>
        <td class="teammembertd"><%:Html.LabelFor(model => teamMember.StartTime)%></td>
       <%-- <td class="teammembertd"><%:Html.LabelFor(model => teamMember.EndTime)%></td>   --%>     
    </tr>

<%foreach (TeamMemberModel model in Model)
  { %>
    <tr>
        <td class="display-field"><%: model.ProjectName%></td> 
        <td class="display-field"><%: model.EmployeeId%></td>
        <td class="display-field"><%: model.EmployeeName%></td>
        <td class="display-field"><%: model.Position%></td>
        <td class="display-field"><%: model.Director%></td>
        <td class="display-field"><%: model.StartTime%></td>
        <%--<td class="display-field"><%: model.EndTime%></td>--%>
        <td id="tdnoline"><%:Ajax.ActionLink("编辑", "EditTeammember", new { id = model.ProjectName + "," + model.EmployeeId }, new AjaxOptions { UpdateTargetId = "editteammember", HttpMethod = "GET" })%></td>
        <td id="tdnoline"><%:Ajax.ActionLink("释放", "ReleaseTeammember", new { id = model.ProjectName + "," + model.EmployeeId }, new AjaxOptions { UpdateTargetId = "editteammember", HttpMethod = "GET" })%></td>
        <td id="tdnoline"><%:Ajax.ActionLink("释放到新项目组", "ReleaseTeammemberToNewProject", new { id = model.ProjectName + "," + model.EmployeeId }, new AjaxOptions { UpdateTargetId = "editteammember", HttpMethod = "GET" })%></td>
    </tr>
<%} %>

</table>
 <div style ="text-align:center">
   <%=Ajax.Pager(Model,new PagerOptions(){PageIndexParameterName="id"},
                                      new AjaxOptions() { UpdateTargetId = "teammember" })%>

   </div>
<%--<%} %>--%>

<div id="editteammember" >

</div>

</div>